#ifndef ROOM_HH
#define ROOM_HH

#include "../include/Enemy.hh"
#include "../include/Item.hh"
#include <vector>
#include <memory>

namespace Game {
    class Room {
    public:
        enum Type { START, NORMAL , BOSS, TRAP, HEALING };

        Room();
        Room(Type type, const std::string& desc);
        Room(const Room& other);
        Room& operator=(const Room& other);
        ~Room() = default;

        Type getType() const;
        void clearEnemy();
        std::string getDesc() const;
        void connect(Room* north, Room* east, Room* south, Room* west);
        void enter(ICharacter& player);
        void generateEnemy();
        void generateLoot();
        Room* getNorth() const;
        Room* getEast() const;
        Room* getSouth() const;
        Room* getWest() const;
        Enemy* getEnemy() const;
        std::vector<std::unique_ptr<Item>>& getLoot();

    private:
        Type type_;
        std::string desc_;
        std::unique_ptr<ICharacter> enemy_;
        std::vector<std::unique_ptr<Item>> loot_;
        Room* north_ = nullptr;
        Room* east_ = nullptr;
        Room* south_ = nullptr;
        Room* west_ = nullptr;
    };
}

#endif